<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Graph database concepts</title>
<link rel="stylesheet" type="text/css" href="../../styles/doc.css" />
</head>

<body>

<div id="content">

<h1>Graph database concepts</h1>

<p>Graph data structures provide a flexible and intuitive way to
model data. In graph theory (math) lingo you could say that Neo4j stores
a rooted directed graph with label sets on both vertices and edges. But
let's stick to the Neo4j terminology here:</p>

<ul>
	<li>the <strong>node space</strong> is simply put your database</li>
	<li>in the node space you put <strong>nodes</strong> and <strong>relationships</strong></li>
	<li>relationships have one <strong>start node</strong> and one <strong>end
	node</strong></li>
	<li>relationships have an immutable <strong>relationship
	type</strong></li>
	<li>both nodes and relationships have <strong>properties</strong></li>
	<li>properties are <strong>key/value pairs</strong></li>
	<li>property <strong>keys</strong> are <strong>Strings</strong></li>
	<li>property <strong>values</strong> are <strong>String,
	char, long, int, short, byte, double, float, boolean</strong> or an <strong>[]</strong>
	of one of those</li>
	<li>the main entry point of the node space is the <strong>reference
	node</strong></li>
	<li>both nodes and relationships have an id of type long</li>
	<li>relationship types have a name</li>
</ul>

<p>This is how the basic elements fit together:</p>
<p><img src="concepts-1.png"></p>
<p>Revealing the reference node as well will give us this view:</p>
<p><img src="concepts-2.png"></p>


</div>

</body>
</html>